package com.design;

/**
 * 测试类
 */
public class MainTest {
    public static void main(String[] args) {
        Leave leave=new Leave(10,"张三");
        Approve teamApprove=new TeamApprove();
        Approve managerApprove=new ManagerApprove();
        Approve bossApprove=new BossApprove();
        teamApprove.setNextApprove(managerApprove);
        managerApprove.setNextApprove(bossApprove);
        teamApprove.approve(leave);
    }
}
